xend: call pci_device_configure on the stubdom
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 14 Oct 2009 07:56:55 +0000 (08:56 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 14 Oct 2009 07:56:55 +0000 (08:56 +0100)
Whenever pci_device_configure is called on a guest that has a stubdom,
call pci_device_configure on the stubdom as well.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
tools/python/xen/xend/XendDomainInfo.py

index 5c3b1f6c52984ddf0b73fa9cf7bfd577956db5f5..fb76b47ca658a8f5d9daf3b3a1ad830e8bcbc7e6 100644 (file)
@@ -855,6 +855,13 @@ class XendDomainInfo:
         dev_config = pci_convert_sxp_to_dict(dev_sxp)
         dev = dev_config['devs'][0]
 
+        dom_list = xstransact.List('/local/domain')
+        for d in dom_list:
+            target = xstransact.Read('/local/domain/' + d + '/target')
+            if target is not None and int(target) is self.domid :
+                from xen.xend import XendDomain
+                XendDomain.instance().domain_lookup(int(d)).pci_device_configure(dev_sxp[:])
+
         # Do HVM specific processing
         if self.info.is_hvm():
             if pci_state == 'Initialising':